<template>
  <div>
    <a @click="setFilter('all')" :class="{ active: $store.state.filter === 'all' }"> All</a>
    <a @click="setFilter('finished')" :class="{ active: $store.state.filter === 'finished' }">
      All</a
    >
    <a @click="setFilter('unfinished')" :class="{ active: $store.state.filter === 'unfinished' }">
      All</a
    >
  </div>
</template>

<script setup lang="ts">
import { useStore } from 'vuex';

const store = useStore();
const setFilter = (filter: string) => {
  store.commit('setFilter', filter);
};
</script>

<style scoped></style>
